﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp25
{
    class Program
    {
        static void Main(string[] args)
        {
            //判断D盘是否存在文件夹mySolo
            bool flag = Directory.Exists("D:\\mySolo");
            if (flag)
            {
                Directory.Delete("D:\\mySolo", true);
            }
            else
            {
                Directory.CreateDirectory("D:\\mySolo");
            }
            

            FileInfo fileInfo = new FileInfo("D:\\mySolo\\text.txt");
            fileInfo.Create().Close();
            string text = @"D:\\mySolo\\text.txt";
            StreamWriter streamWriter = new StreamWriter(text );
            streamWriter .WriteLine ("           刀马旦");
            streamWriter.WriteLine("耍花枪一个后空翻");
            streamWriter.WriteLine("腰身跟着转马步扎的稳当");
            streamWriter.WriteLine("耍花腔比谁都漂亮");
            streamWriter.WriteLine("接着唱一段虞姬和霸王");
            streamWriter.Flush();
            streamWriter.Close();
        }
    }
}
